using System;
namespace Common.Environment
{
	public class NetworkInfo
	{
		private NetConnectionStatus _mStatus;
		public string DeviceName
		{
			get;
			set;
		}
		public string MacAddress
		{
			get;
			set;
		}
		public string AdapterType
		{
			get;
			set;
		}
		public string Ip
		{
			get;
			set;
		}
		public string Mask
		{
			get;
			set;
		}
		public string DefaultGateway
		{
			get;
			set;
		}
		public string ConnectionID
		{
			get;
			set;
		}
		public string IpWan
		{
			get;
			set;
		}
		public NetConnectionStatus Status
		{
			get
			{
				return this._mStatus;
			}
			set
			{
				this._mStatus = value;
			}
		}
		public string GetHelp()
		{
			string result;
			if (this._mStatus == NetConnectionStatus.Connected)
			{
				result = "Connect succeed.";
			}
			else
			{
				if (this._mStatus == NetConnectionStatus.Disconnected)
				{
					result = "Your connection was disable, please check Network Setting in Console.";
				}
				else
				{
					if (this._mStatus == NetConnectionStatus.MediaDisconnected)
					{
						result = "Cable had bad contact with Network Card! Please check it.";
					}
					else
					{
						if (this._mStatus == NetConnectionStatus.InvalidAddress)
						{
							result = "IP address is Invalid, please check DHCP/Router or IP setting.";
						}
						else
						{
							result = string.Format("NetConnectionStatus is {0}", this._mStatus);
						}
					}
				}
			}
			return result;
		}
	}
}
